﻿using System;
using System.Drawing;
using Contacts.Data.Data;

namespace Contacts.Data.Model
{
   public class Persons
   {
      public int PersonID { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
      public string Phone { get; set; }
      public string Email { get; set; }
      public DateTime Birthday { get; set; }
      public string Photo { get; set; }
      public int GroupID { get; set; }

      public string GroupName { get; set; }

      public Image Image
      {
         get
         {
            return Image.FromFile(Photo);
         }
      }

       //public Groups Group
       //{
       //   get
       //   {
       //      ContactsDataGroups data = new ContactsDataGroups();
       //      return data.LoadByID(GroupID);
       //   }
       //}
   }
}
